import React from 'react'
import {  Link,Routes,Route,Outlet } from 'react-router-dom'

export default function Page1() {
  return (
    <div>
       <Link to='/link1'>基本用法</Link>
       <Link to='/link2'>基本用法</Link>
       <Link to='/link1/Link11'>/link1/Link11</Link>
       <Link to='/link1' replace={true}>replace</Link>
       <Link to='.' >.</Link>
       <Link to='..' >..</Link>
       <Link to='.link1' >.link1</Link>
       <Link to='..link1' >..link1</Link>
       <Link to='../link1' >../link1</Link>
       <Link to='./link1' >./link1</Link>
       <Link to='link1' >link1</Link>
       <Routes>
        {/* 这个表示link子路由的默认  如果没有/link不会渲染 */}
        <Route index element={<div>index</div>}></Route>
        <Route path='.link1' element={<div>.link1</div>}></Route>
        <Route path='.link1' element={<div>.link1</div>}></Route>
        <Route path='..link1' element={<div>..link1</div>}></Route>
        <Route path='link1' element={<div>link1</div>}></Route>
        <Route path='Link11' element={<div>Link11</div>}></Route>
       </Routes>
       <div>————————————————————————————————————————</div>
       {/* 这个只能Route写在全部里面得时候才起作用 不然看的还是Route得位置 */}
       <Outlet></Outlet>
    </div>
   
  )
}
